package com.citywy.controller;

import com.citywy.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ajax")
public class AjaxController {
    @RequestMapping("test1")
    public @ResponseBody User ajaxTest1(@RequestBody User user){
        System.out.println("异步按钮点击触发");
        System.out.println(user);
        user.setName("塔睿");
        user.setAge(22);
        return user;
    }
}
